﻿using CompanyCMS.App_Code;
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CompanyCMS.Admin
{
    public partial class categorymanage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind(1);
            }
        }

        void Bind(int index)
        {
            gvcategory.DataSource = CommonBLL.GetCategories(index);
            gvcategory.DataBind();
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/admin/editcategory.aspx");
        }
    }
}